package cs304.p3.library.exceptions;

import javax.swing.JOptionPane;

@SuppressWarnings("serial")
public abstract class AbstractLDBException extends Exception{
	
	protected AbstractLDBException(String msg){
		super(msg);
	}
	
	abstract public String getErrorMessage();
	
	abstract public String getErrorMessageTitle();
	
	public final void displayError(){
		JOptionPane.showMessageDialog(null, getErrorMessage(), getErrorMessageTitle(), JOptionPane.ERROR_MESSAGE);
	}

}
